<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Intermediate.funUtils.html">
<link rel="Up" href="Intermediate.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class attributes" rel=Appendix href="index_attributes.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Commands" rel="Chapter" href="Commands.html">
<link title="Declaration" rel="Chapter" href="Declaration.html">
<link title="Exceptions" rel="Chapter" href="Exceptions.html">
<link title="Expressions" rel="Chapter" href="Expressions.html">
<link title="Intermediate" rel="Chapter" href="Intermediate.html">
<link title="Lexer" rel="Chapter" href="Lexer.html">
<link title="Main" rel="Chapter" href="Main.html">
<link title="Parser" rel="Chapter" href="Parser.html">
<link title="Print" rel="Chapter" href="Print.html">
<link title="Print_syntaxtree" rel="Chapter" href="Print_syntaxtree.html">
<link title="Semantic" rel="Chapter" href="Semantic.html">
<link title="Subroutines" rel="Chapter" href="Subroutines.html">
<link title="Syntaxtree" rel="Chapter" href="Syntaxtree.html">
<link title="Target" rel="Chapter" href="Target.html"><title>Intermediate.intermediateCode</title>
</head>
<body>
<div class="navbar"><a href="Intermediate.funUtils.html">Previous</a>
&nbsp;<a href="Intermediate.html">Up</a>
&nbsp;</div>
<center><h1>Class <a href="type_Intermediate.intermediateCode.html">Intermediate.intermediateCode</a></h1></center>
<br>
<pre><span class="keyword">class</span> <a name="TYPEintermediateCode"></a>intermediateCode : <code class="type"></code><code class="code">object</code> <a href="Intermediate.intermediateCode.html">..</a> <code class="code">end</code></pre>This class is a over-structure for the funUtils class, and has methods for the manage of global variables, like registers, which are indipendent from the function (main or subroutines) that is processed<br>
<hr width="100%">
<pre><span class="keyword">val</span> <a name="ATTil"></a><span class="keyword">mutable</span> <a href="code_ATTIntermediate.intermediateCode.il.html">il</a> : <code class="type"><a href="Intermediate.funUtils.html">funUtils</a></code></pre><div class="info">
The instance of the funUtils class created by default<br>
</div>
<pre><span class="keyword">val</span> <a name="ATTreg"></a><span class="keyword">mutable</span> <a href="code_ATTIntermediate.intermediateCode.reg.html">reg</a> : <code class="type"><a href="Intermediate.html#TYPEregister">register</a></code></pre><div class="info">
The variable which count how many registers have been used<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODgetIc"></a><a href="code_METHODIntermediate.intermediateCode.getIc.html">getIc</a> : <code class="type">int</code></pre><div class="info">
A wrapper for the getIc method of the funUtils class<br>
<b>Returns</b> The instruction counter<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODgetInstructionList"></a><a href="code_METHODIntermediate.intermediateCode.getInstructionList.html">getInstructionList</a> : <code class="type"><a href="Intermediate.html#TYPEinstruction">instruction</a> list</code></pre><div class="info">
A wrapper for the getIc method of the funUtils class<br>
<b>Returns</b> The instruction list<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODsetInstructionClass"></a><a href="code_METHODIntermediate.intermediateCode.setInstructionClass.html">setInstructionClass</a> : <code class="type"><a href="Intermediate.funUtils.html">funUtils</a> -> unit</code></pre><div class="info">
Setter method which allows substitution of the funUtils class<br>
</div>
<div class="param_info"><code class="code">newil</code> : The new funUtils instance</div>
<pre><span class="keyword">method</span> <a name="METHODgetInstructionClass"></a><a href="code_METHODIntermediate.intermediateCode.getInstructionClass.html">getInstructionClass</a> : <code class="type"><a href="Intermediate.funUtils.html">funUtils</a></code></pre><div class="info">
Getter method  of the funUtils class<br>
<b>Returns</b> the funUtils instance<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODaddInstr"></a><a href="code_METHODIntermediate.intermediateCode.addInstr.html">addInstr</a> : <code class="type"><a href="Intermediate.html#TYPEinstruction">instruction</a> -> unit</code></pre><div class="info">
Add a new instruction, calling the addInstr
        method of the funUtils class<br>
</div>
<div class="param_info"><code class="code">i</code> : The instruction to add</div>
<pre><span class="keyword">method</span> <a name="METHODgetInstr"></a><a href="code_METHODIntermediate.intermediateCode.getInstr.html">getInstr</a> : <code class="type">int -> <a href="Intermediate.html#TYPEinstruction">instruction</a></code></pre><div class="info">
Get the instruction at position i, 
        calling the getInstr method of the funUtils class<br>
<b>Returns</b> The instruction at index i<br>
</div>
<div class="param_info"><code class="code">i</code> : The instruction index to get</div>
<pre><span class="keyword">method</span> <a name="METHODstack"></a><a href="code_METHODIntermediate.intermediateCode.stack.html">stack</a> : <code class="type"><a href="Intermediate.html#TYPEoffset">offset</a></code></pre><div class="info">
Get the next offset for a variable<br>
<b>Returns</b> The next available offset<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODgetReg"></a><a href="code_METHODIntermediate.intermediateCode.getReg.html">getReg</a> : <code class="type"><a href="Intermediate.html#TYPEregister">register</a></code></pre><div class="info">
Get the next available register index<br>
<b>Returns</b> The next register index<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODaddLabel"></a><a href="code_METHODIntermediate.intermediateCode.addLabel.html">addLabel</a> : <code class="type"><a href="Intermediate.html#TYPEelement">element</a> -> int -> unit</code></pre><div class="info">
Wrapper for the addLabel method<br>
</div>
<div class="param_info"><code class="code">lab</code> : The element (a label) to bind with the instruction</div>
<div class="param_info"><code class="code">ip</code> : The number of the instruction where the label is binded</div>
<pre><span class="keyword">method</span> <a name="METHODgetLabel"></a><a href="code_METHODIntermediate.intermediateCode.getLabel.html">getLabel</a> : <code class="type"><a href="Intermediate.html#TYPEelement">element</a></code></pre><div class="info">
Retrive the label binded with an instruction<br>
<b>Returns</b> The label binded with the instruction<br>
</div>
<pre><span class="keyword">method</span> <a name="METHODhasLabel"></a><a href="code_METHODIntermediate.intermediateCode.hasLabel.html">hasLabel</a> : <code class="type">int -> bool</code></pre><div class="info">
Check if an instruction is binded with a label<br>
<b>Returns</b> True if the instruction is binded with a label, false otherwise<br>
</div>
<div class="param_info"><code class="code">i</code> : The index to check</div>
<pre><span class="keyword">method</span> <a name="METHODgetInstrLabel"></a><a href="code_METHODIntermediate.intermediateCode.getInstrLabel.html">getInstrLabel</a> : <code class="type">int -> <a href="Intermediate.html#TYPEelement">element</a></code></pre><div class="info">
Retrive the label binded with an instruction<br>
<b>Returns</b> The label binded with the instruction<br>
</div>
<div class="param_info"><code class="code">i</code> : The instruction associated with a label</div>
</body></html>